import {BasicColumn} from '/@/components/Table';
import {FormSchema} from '/@/components/Table';
import { rules} from '/@/utils/helper/validator';
import { render } from '/@/utils/common/renderUtils';
//列表数据
export const columns: BasicColumn[] = [
   {
    title: '姓名',
    align:"center",
    dataIndex: 'name'
   },
   {
    title: '直属上级',
    align:"center",
    dataIndex: 'superiorId'
   },
   {
    title: '职位',
    align:"center",
    dataIndex: 'postion'
   },
   {
    title: '工资',
    align:"center",
    dataIndex: 'salaryMoney'
   },

  {
    title: '社保',
    align:"center",
    dataIndex: 'socialSecurity'
  },
  {
    title: '公积金',
    align:"center",
    dataIndex: 'accumulationFund'
  },
  {
    title: '其他',
    align:"center",
    dataIndex: 'otherBonus'
  },

/*   {
    title: '奖金',
    align:"center",
    dataIndex: 'bonusMoney'
   },*/
   {
    title: '性别',
    align:"center",
    dataIndex: 'sex_dictText'
   },
   {
    title: '年龄',
    align:"center",
    dataIndex: 'age'
   },
/*  {
    title: '当前工作量',
    align:"center",
    dataIndex: 'usePercent'
  },*/
/*  {
    label: '当前工作量',
    field: 'usePercent',
    component: 'Input',
  },*/
   {
    title: '个人简介',
    align:"center",
    dataIndex: 'content'
   },
];
//查询数据
export const searchFormSchema: FormSchema[] = [
  {
    label: '姓名',
    field: 'name',
    component: 'JInput',
    colProps: { span: 4 },
  },
];
//表单数据
export const formSchema: FormSchema[] = [
  {
    label: '姓名',
    field: 'name',
    component: 'Input',
  },
  {
    label: '直属上级',
    field: 'superiorId',
    component: 'Input',
  },
  {
    label: '职位',
    field: 'postion',
    component: 'Input',
  },
  {
    label: '工资',
    field: 'salaryMoney',
    component: 'InputNumber',
  },

  {
    label: '社保',
    field: 'socialSecurity',
    component: 'InputNumber',
  },
  {
    label: '公积金',
    field: 'accumulationFund',
    component: 'InputNumber',
  },
  {
    label: '其他',
    field: 'otherBonus',
    component: 'InputNumber',
  },

/*  {
    label: '奖金',
    field: 'bonusMoney',
    component: 'InputNumber',
  },*/


  {
    label: '性别',
    field: 'sex',
    component: 'JDictSelectTag',
    componentProps: {
      dictCode: 'sex',
      stringToNumber: true,
    },
  },

  {
    label: '年龄',
    field: 'age',
    component: 'InputNumber',
  },
  {
    label: '个人简介',
    field: 'content',
    component: 'Input',
  },
	// TODO 主键隐藏字段，目前写死为ID
	{
	  label: '',
	  field: 'id',
	  component: 'Input',
	  show: false
	},
];



/**
* 流程表单调用这个方法获取formSchema
* @param param
*/
export function getBpmFormSchema(_formData): FormSchema[]{
  // 默认和原始表单保持一致 如果流程中配置了权限数据，这里需要单独处理formSchema
  return formSchema;
}
